package com.angular.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;

public interface UserMapper {

    @Select("SELECT * FROM cide_user")
//    @Results({
//        @Result(property = "userSex",  column = "user_sex", javaType = UserSexEnum.class),
//        @Result(property = "id", column = "id")
//    })
    List<Map<String, Object>> getAll();

//    @Select("SELECT * FROM users WHERE id = #{id}")
//    @Results({
//        @Result(property = "userSex",  column = "user_sex", javaType = UserSexEnum.class),
//        @Result(property = "nickName", column = "nick_name")
//    })
//    User getOne(Long id);
//
//    @Insert("INSERT INTO users(userName,passWord,user_sex) VALUES(#{userName}, #{passWord}, #{userSex})")
//    void insert(User user);
//
//    @Update("UPDATE users SET userName=#{userName},nick_name=#{nickName} WHERE id =#{id}")
//    void update(User user);
//
//    @Delete("DELETE FROM users WHERE id =#{id}")
//    void delete(Long id);

}